package cn.service.service.impl;

import cn.service.dao.GoodsDao;
import cn.service.entiy.Goods;
import cn.service.service.GoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class GoodsServiceImpl implements GoodsService {

    @Autowired
    private GoodsDao goodsDao;

    @Override
    public Boolean add(Goods goods) {
        int i=goodsDao.add(goods);
        if(i==1){
            return true;
        }
        return false;
    }

    @Override
    public Goods getGoodsById(Integer goodsId) {
        return goodsDao.getGoodsById(goodsId);
    }
}
